﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cms.BLL.Controls
{
    public enum jqColumnFormat { 
        Link,
        Date,
        CheckBox
    }
    public class jqColumn
    {
        /// <summary>
        /// 列名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 列标题
        /// </summary>
        public string caption { get; set; }
        public int width { get; set; }
        /// <summary>
        /// 是否允许编辑
        /// </summary>
        public bool editable { get; set; }

    }
    public class jqGrid : BaseControl
    {
        /// <summary>
        /// 是否表格树
        /// </summary>
        public bool TreeGrid { get; set; }
        /// <summary>
        /// 是否允许编辑
        /// </summary>
        public bool AllowEdit { get; set; }
        public List<jqColumn> Columns { get; set; }
        public string TableName { get; set; }
        public string KeyField { get; set; }
        public string ParentField { get; set; }
        public string DisplayField { get; set; }
        public ControlStyle Style { get; set; }
        public jqGrid()
        {
            this.Type = ControlType.jqGrid;
            this.Columns = new List<jqColumn>();
            this.Style = new ControlStyle(300,200);
        }
    }
}
